home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / lang / amigatalk.lha / intuition / BoopsiScrollerTags.st < prev    next >
Text File  |  2002-05-07  |  2KB  |  75 lines

  1. " --------------------------------------------------------------------- "
  2. " BoopsiScrollerTags Class is a Singleton class that allows the user    "
  3. " to reference BOOPSI Scroller class tags' hexadecimal values.          "
  4. ""
  5. "  EXAMPLE:  'myTag <- scrollerTags getTag: #SCROLLER_Total'            "
  6. ""
  7. " ALL singleton classes MUST contain the following:                     "
  8. "" 
  9. "  the methods:  isSingleton AND privateSetup     AND                   "
  10. "                 uniqueInstance Class instance variable.               "
  11. " --------------------------------------------------------------------- "
  12.  
  13. Class BoopsiScrollerTags :Dictionary ! uniqueInstance !
  14. [
  15.    isSingleton
  16.      ^ true  
  17. |  
  18.    privateNew ! newinstance !
  19.      newinstance <- super new.
  20.  
  21.      ^ newinstance
  22. |
  23.    new
  24.      ^ self privateSetup
  25. |
  26.    getTag: tagKey
  27.      ^ self at: tagKey
  28. |
  29.    privateInitializeDictionary
  30.  
  31.      " (WORD) scroller Top value (Defaults to 0). "
  32.      self at: #SCROLLER_Top           put: 16r85005001.
  33.  
  34.      " (WORD) visible part of total. "
  35.      self at: #SCROLLER_Visible       put: 16r85005002.
  36.  
  37.      " (WORD) total scroller size. "
  38.      self at: #SCROLLER_Total         put: 16r85005003.
  39.  
  40.      " (WORD) Vertical or Horizontal mode. "
  41.      self at: #SCROLLER_Orientation   put: 16r85005004.
  42.  
  43.      " (BOOL) Render arrows. "
  44.      self at: #SCROLLER_Arrows        put: 16r85005005.
  45.  
  46.      " (BOOL) AutoExpand/Stretch Total. "
  47.      self at: #SCROLLER_Stretch       put: 16r85005006.
  48.  
  49.      " (WORD) Change arrow click makes. "
  50.      self at: #SCROLLER_ArrowDelta    put: 16r85005007.
  51.  
  52.      " (struct Task *) Signal this Task while scroller is active "
  53.      self at: #SCROLLER_SignalTask    put: 16r8500500A.
  54.  
  55.      " (ULONG) Signal with this Bit. "
  56.      self at: #SCROLLER_SignalTaskBit put: 16r8500500B.
  57.  
  58.      " SCROLLER_Orientation Modes "
  59.  
  60.      self at: #SORIENT_HORIZ          put: 2. " FREEHORIZ "
  61.      self at: #SORIENT_VERT           put: 4. " FREEVERT  "
  62.  
  63.      self at: #SCROLLER_HORIZONTAL    put: 2.
  64.      self at: #SCROLLER_VERTICAL      put: 4.
  65. |
  66.    privateSetup
  67.      (uniqueInstance isNil)
  68.        ifTrue: [uniqueInstance <- self privateNew.
  69.                 
  70.                 self privateInitializeDictionary.
  71.                ].
  72.                
  73.      ^ self    "or ^ uniqueInstance??"
  74. ]
  75.